package com.test.kotlin05

import kotlin.math.absoluteValue

class Player2(
    _name:String,
    var age:Int,
    var isNormal:Boolean //在主构造函数里定义属性
) {
    var name = _name
        get() = field.capitalize()
        set(value){
            field = value.trim()
        }




}


fun main() {
    val player:Player2 = Player2("jack",18,true)

    println(player.name)

}